package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.newyear2023.FireWorkUserData;
import com.yanqu.road.entity.activity.newyear2023.cross.CrossFireWorkUserData;
import com.yanqu.road.entity.activity.newyear2023.cross.RedPacketTable;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class FireWorkBusiness {

    public static FireWorkUserData getUserData(long userId, int activityId) {
        return DaoHelper.getFireWorkUserDataDaoImpl().getUserData(activityId, userId);
    }


    public static boolean addUserData(FireWorkUserData userData) {
        return DaoHelper.getFireWorkUserDataDaoImpl().add(userData);
    }

    public static boolean updateUserData(FireWorkUserData userData) {
        return DaoHelper.getFireWorkUserDataDaoImpl().update(userData);
    }


    public static Map<Long, CrossFireWorkUserData> getCrossUserDataMap(int activityId) {
        return DaoHelper.getCrossFireWorkDaoImpl().getUserDataMap(activityId);
    }

    public static Map<Long, Map<Integer, RedPacketTable>> getRedPacketTableMap(int activityId) {
        return DaoHelper.getCrossFireWorkDaoImpl().getRedPacketTableMap(activityId);
    }

    public static int getMaxTableIndex(int activityId) {
        return DaoHelper.getCrossFireWorkDaoImpl().getMaxTableIndex(activityId);
    }

    public static void addRedPacketTableList(List<RedPacketTable> insertList) {
        DaoHelper.getCrossFireWorkDaoImpl().addRedPacketTableList(insertList);
    }

    public static void updateRedPacketTableList(List<RedPacketTable> updateList) {
        DaoHelper.getCrossFireWorkDaoImpl().updateRedPacketTableList(updateList);
    }

    public static void addCrossUserDataList(List<CrossFireWorkUserData> insertList) {
        DaoHelper.getCrossFireWorkDaoImpl().addUserDataList(insertList);
    }

    public static void updateCrossUserDataList(List<CrossFireWorkUserData> updateList) {
        DaoHelper.getCrossFireWorkDaoImpl().updateUserDataList(updateList);
    }
}
